import React from 'react';
import { List, WhiteSpace } from 'antd-mobile';
import ChildWrap from '../../components/layout/childWrap';

const Item = List.Item;

export default function Center(props) {
    const avatar = (<img
        src={require('../../assets/img/defaultAvatar.png')}
        style={{marginLeft: '70%', width: '26%', height: '26%'}}
    />);
    return (
        <ChildWrap
            content="个人中心"
        >
            <List>
                <Item
                    extra={avatar}
                    arrow="horizontal"
                    multipleLine
                >
                    头像
                </Item>
            </List>
            <List>
                <Item
                    extra={props.infor.userName}
                >
                    用户名
                </Item>
            </List>

            <WhiteSpace size="lg"/>

            <List>
                <Item
                    extra={props.infor.name}
                >
                    姓名
                </Item>
            </List>
            <List>
                <Item
                    extra={props.infor.gender}
                >
                    性别
                </Item>
            </List>
            <List>
                <Item
                    extra={props.infor.institution}
                >
                    机构
                </Item>
            </List>
            <List>
                <Item
                    extra={props.infor.department}
                >
                    科室
                </Item>
            </List>
            <List>
                <Item
                    extra={props.infor.role}
                >
                    职务
                </Item>
            </List>

            <WhiteSpace size="lg"/>

            <List>
                <Item
                    extra={props.infor.phoneNumber}
                    arrow="horizontal"
                >
                    手机号码
                </Item>
            </List>
            <List>
                <Item
                    extra={props.infor.email}
                    arrow="horizontal"
                >
                    邮箱
                </Item>
            </List>

            <WhiteSpace size="lg"/>

            <List>
                <Item
                    arrow="horizontal"
                >
                    修改密码
                </Item>
            </List>
        </ChildWrap>
    );
}
